<script>
import axios from 'axios'
import Trade from './components/Trade.vue'
import Trades from './components/Trades.vue'
import RiseTradeVue  from './components/RiseTrade.vue'


export default {
    components: {
        Trade,
        Trades,
        RiseTradeVue
    },
    data() {
        return {
            code: undefined,
            start: undefined,
            end: undefined
        }
    },
    
    methods: {
        changeCode(code) {
            this.code = code
        },
        changeDate(date) {
            this.start = date.start
            this.end = date.end
            console.log(this.start, this.end);
        }
    },
    mounted() {

    },
    updated() {
    }
}
</script>

<template>
    <Trades @changeCode="changeCode" @changeDate="changeDate"/>

    <Trade :code="code" :start="start" :end="end"/>

    <RiseTradeVue />
</template>

<style scoped>

</style>
